package nighttest.day04;

import java.io.IOException;
import java.io.RandomAccessFile;

public class test4_1 {
    public static void main(String[] args) throws IOException, IOException {
		RandomAccessFile src = new RandomAccessFile("./test.txt","r");
		RandomAccessFile desc = new RandomAccessFile("./test_cp.txt","rw");
		int len;
		byte[] data = new byte[1024*10];
        while((len = src.read(data))!=-1) {
			desc.write(data);
		}
        System.out.println("复制完毕!");
        src.close();
        desc.close();
    }

}
